When we can't detect a headphone by form factor, we do a string
match on the port name. A match on 'Headphone' isn't less likely
to be valid than a match on 'headphone', so make sure we ignore
capitalization.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2691>
// of different identifiers for headphones, and I could
// not find the complete list
if (sink.get_ports().length > 0)
- return sink.get_port().port.includes('headphone');
+ return sink.get_port().port.toLowerCase().includes('headphone');
return false;
}